package com.yueka.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yueka.pojo.entity.activity.Activity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ActivityMapper extends BaseMapper<Activity> {

    List<Activity> list(@Param("activityName") String activityName,
                        @Param("status") String status,
                        @Param("isBanner") String isBanner);

    @Select("select id, activity_name, status, is_banner, description, create_time, update_time, avatar from activity where status = '1' and is_banner = '1'")
    List<Activity> getBanners();

    @Select("select id, activity_name, status, is_banner, description, create_time, update_time, avatar from activity where status = '1' and is_banner = '0'")
    List<Activity> getActivityWebList();
}
